package org.tgcloud.group.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.tgcloud.group.entity.ProjectFile;
import org.tgcloud.group.web.controller.dto.project.file.ProjectFileDTO;

import java.util.Date;
import java.util.List;

/**
 * @Author: zhy
 * @Created: 2025-10-16-下午2:15
 * @Description: ${description}
 */
@Mapper
public interface ProjectFileMapper extends BaseMapper<ProjectFile> {
    int deleteByPrimaryKey(Integer id);

//    int insert(ProjectFile record);

    int insertSelective(ProjectFile record);

    ProjectFile selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(ProjectFile record);

    int updateByPrimaryKey(ProjectFile record);

    List<ProjectFileDTO> selectManageListByKeyword(@Param("projectId") Integer projectId, @Param("keyword") String keyword, @Param("fileTypeList") List<Integer> fileTypeList, @Param("rejectStatus") Short rejectStatus,@Param("stageId") Integer stageId,
                                                   @Param("createStartTime") Date createStartTime, @Param("createEndTime") Date createEndTime,
                                                   @Param("rejectStartTime") Date rejectStartTime, @Param("rejectEndTime") Date rejectEndTime);

    int updateRejectById(@Param("id") Integer id, @Param("rejectReason") String rejectReason,
                         @Param("userId") Integer userId, @Param("userType") Short userType);

    ProjectFile selectMsgByFileTypeAndNoId(@Param("id") Integer id, @Param("fileType") Integer fileType, @Param("projectId") Integer projectId);

    int updateFinalById(@Param("id") Integer id, @Param("userId") int userId, @Param("userType") short userType);

    int updateChannelFinalId(@Param("id") Integer id, @Param("userId") int userId, @Param("userType") short userType);

    int updateFinalUpdateTypeByProjectIdAndType(@Param("projectId") Integer projectId, @Param("fileType") Integer fileType, @Param("finalUpdateType") Short finalUpdateType);
}